package com.huaweicloud.saaslanding.install.dto;

import com.huaweicloud.saaslanding.dao.common.entity.master.AppAccount;
import com.huaweicloud.saaslanding.dao.common.entity.master.Org;
import com.huaweicloud.saaslanding.dao.common.entity.master.User;
import com.huaweicloud.saaslanding.dao.common.entity.master.UserRole;
import com.huaweicloud.saaslanding.dao.common.entity.tenant.Tenant;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class UserAndTenantAndRole {
    private Long userId;

    private Long tenantId;

    private Long appId;

    private String idaasTenantId;

    private String idaasUserId;

    private String idaasAccountId;

    private User user;

    private Tenant tenant;

    private Org org;

    private String salt;

    private String password;

    private String cmAccessKey;

    private AppAccount hslAppAccount;

    private UserRole userRole;

    private Long roleId;

    private List<User> idList;

    public List<User> getIdList() {
        return new ArrayList<>(idList);
    }

    public void setIdList(List<User> list) {
        idList = list == null ? new ArrayList<>() : new ArrayList<>(list);
    }

    private List<Tenant> idListOrg;

    public List<Tenant> getIdListOrg() {
        return new ArrayList<>(idListOrg);
    }

    public void setIdListOrg(List<Tenant> list) {
        idListOrg = list == null ? new ArrayList<>() : new ArrayList<>(list);
    }
}
